﻿<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
        <link href="jquery-easyui-1.5/themes/black/easyui.css" rel="stylesheet" />

        <script src="jquery-easyui-1.5/jquery.min.js"></script>
        <script src="jquery-easyui-1.5/jquery.easyui.min.js"></script>
		<script type="text/javascript">
			$(function(){
				var grid = $('#datagrid').datagrid({
					url:'http://10.3.136.12/ctapi/dispatch/offers/FetchSupplier',
					loadFilter: function (data) {
						var obj = { total:data.datagrid.data.rowscount, rows:[]};
						$.each(data.datagrid.data.rows, function(index,_obj) {
							var _tr = {};
							for(var key in _obj.RowData){
								_tr[key] = _obj.RowData[key].Value;
							}
							obj.rows.push(_tr)
						});
						return obj;
					},
					columns: [[
                    { field: 'suname', title: 'suname', width: 100 },
                    { field: 'suaddress', title: 'suaddress', width: 100 },
                    { field: 'contact', title: 'contact' },
                    { field: 'suphone', title: 'suphone' }
					]]
				})
			})
		</script>
		
	</head>
	<body>
		<table id="datagrid" >
		</table>
	</body>
</html>
